﻿@model FlyingClub.Models.PasswordEdit

@{
    ViewBag.Title = "Changer de mot de passe";
}

<h1>@ViewBag.Title</h1>

@ViewBag.ERRORMESSAGE

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    if (Session["Staff"] == null)
    {
        <p>@Html.LabelFor(model => model.OldPassword, "Mot de passe actuel")@Html.PasswordFor(model => model.OldPassword)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.OldPassword)</p>
        <p class="break-line"></p>
    }
    else
    {
        @Html.HiddenFor(model => model.OldPassword)
    }
    <p>@Html.LabelFor(model => model.NewPassword, "Nouveau mot de passe")@Html.PasswordFor(model => model.NewPassword)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.NewPassword)</p>
    <p class="break-line"></p>
    <p>@Html.LabelFor(model => model.NewPasswordConfim, "Confirmez")@Html.PasswordFor(model => model.NewPasswordConfim)<label style="width : auto; color : rgb(255, 0, 0);">*</label>@Html.ValidationMessageFor(model => model.NewPasswordConfim)</p>
    <p class="break-line"></p>
    @Html.HiddenFor(model => model.ID)
    <p><label></label><input type="submit" /><input type="submit" value="Changer" /><label style="width : auto; color : rgb(255, 0, 0);">*Champ requis</label></p>
    <p class="break-line"></p>
}